'''
Created on 2010/07/06

@author: yukiyonezawa
'''
class EraseMemoryCRU():
    '''
    classdocs
    '''
    dsfid = object()
    dsfid_on_tag = object()
    access_method = object()
    command_list = object()
    TAG_ID = str()
    start_data_set_address = int()
    driver = object()
    
    def __init__(self, tag_id, driver):
        '''
        Constructor
        '''
        self.TAG_ID = tag_id
        self.driver = driver

    def execute(self):
        
        #handle command_list
        length = self.driver.getUserMemoryLength(self.TAG_ID)
        erase_data = length * "00"
        self.driver.writeUserMemory(self.TAG_ID, 0, erase_data)
        self.driver.configureDSFID(self.TAG_ID, "00")
        
        #dsfid.access_method.addData(self.TAG_ID, self.dsfid_on_tag, dsfid.data_format, add_objects_list)
    
    def encode(self, cru_id):
        pass    